Steps to Build and Run:
----------------------

1. Redis Server (Changes: no changes):
---------------------------------
$ sudo add-apt-repository ppa:redislabs/redis
$ sudo apt-get update
$ sudo apt-get install redis
$ redis-server

2. EdgeX Go (Changes: no changes):
-----------------------------
$ git clone https://github.com/edgexfoundry/edgex-go.git
$ cd edgex-go
$ make build
$ make run	// This command will call Launch script Launch which internally spawns multiple microservices 

3. Modbus Device Service (Changes: copy device profile and configuration.toml):
---------------------------------------------------------------------
$ git clone https://github.com/edgexfoundry/device-modbus-go.git 
$ cd device-modbus-go
// Copy TemperatureHumiditySensor.yml and configuration.toml to ./cmd/res folder
$ make build
$ ./cmd/device-modbus

4. GPIO Device Service (Changes: copy both device profiles and configuration.toml):
-------------------------------------------------------------------------
$ git clone https://github.com/edgexfoundry-holding/device-gpio.git 
$ cd device-gpio
// Copy device-gpio12-profile.yaml, device-gpio14-profile.yaml and configuration.toml to ./cmd/res folder
$ make build
$ ./cmd/device-modbus


5. Application Service 1 (for forwarding Temperature values to Cloud) :(Changes: disable security and copy configuration.toml):
----------------------------------------------------------------------
$ git clone https://github.com/edgexfoundry/app-service-configurable.git
$ cd app-service-configurable
// Copy configuration.toml to ./res folder
// Disable Security (Security is not in the PoC Scope) by adding the following line in main function of ./main.go file
// os.Setenv("EDGEX_SECURITY_SECRET_STORE", "false")
$ make build
$ ./app-service-configurable

6. Application Service 2 (for forwarding Humidity values to Cloud) :(Changes: disable security and copy configuration.toml):
----------------------------------------------------------------------
$ git clone https://github.com/edgexfoundry/app-service-configurable.git
$ cd app-service-configurable
// Copy configuration.toml to ./res folder
// Disable Security (Security is not in the PoC Scope) by adding the following line in main function of ./main.go file
// os.Setenv("EDGEX_SECURITY_SECRET_STORE", "false")
$ make build
$ ./app-service-configurable

7. Kuiper (Changes: no changes):
---------------------------------
$ git clone https://github.com/emqx/kuiper.git
$ cd kuiper
$ make build_with_edgex
$./_build/kuiper-1.1.1-4-g24892eb-linux-aarch64/bin/kuiperd


8. Apply Rules to Kuiper (Changes: Update rules with correct GPIO-PIN Core Commands and run actuate_rule.sh to apply rules):
---------------------------------
// Update rule1.txt, rule2.txt, rule3.txt and rule4.txt with correspoding GPIO-PIN Core Commands
$./_build/kuiper-1.1.1-4-g24892eb-linux-aarch64/actuate_rule.sh // This will apply rules in kuiperd

9. Application Service 3 (for forwading the Sensor Data to Kuiper) :(Changes : disable security and copy configuration.toml):
----------------------------------------------------------------------
$ git clone https://github.com/edgexfoundry/app-service-configurable.git
$ cd app-service-configurable
// Copy configuration.toml to ./res folder
// Disable Security (Security is not in the PoC Scope) by adding the following line in main function of ./main.go file
// os.Setenv("EDGEX_SECURITY_SECRET_STORE", "false")
$ make build
$ ./app-service-configurable
